﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="layout1.ascx.cs" Inherits="FYPHP.layout1" %>
<div style="font-family: <% Response.Write(getFont()); %>;">
<h2>
    <asp:Label ID="lblUsername" runat="server"></asp:Label> Virtual Shop</h2>
<asp:Repeater ID="ItemList" runat="server" EnableViewState="False">
<HeaderTemplate>
<table cellpadding="5" cellspacing="5" width="100%" border="1" bordercolor="#aaaaaa" align="center" style="background-color: <% Response.Write(getBgColor()); %>; border-collapse: collapse; text-align: center">
 <tr style="background-color: #eee; font-weight: bold;"><td>Picture</td><td>Product Name</td><td>Price</td><td>Views</td></tr>

</HeaderTemplate>

<ItemTemplate>
     <tr>
            <td align="center" width="50">
            <img src="\uploads\products\<%#DataBinder.Eval(Container.DataItem, "p_picture" ) %>" alt="" height="40px" width="40px" />
            </td>
            <td style="text-align: left"><a href="/ProductDetails.aspx?id=<%#DataBinder.Eval(Container.DataItem, "p_id" ) %>">
            <%#DataBinder.Eval(Container.DataItem, "p_name" ) %></a> <br /> 
            <i style="font-size:11px;"><%#DataBinder.Eval(Container.DataItem, "p_desc" ) %></i></td>

            <td width="70">$<%#DataBinder.Eval(Container.DataItem, "p_price" ) %></td>
            <td width="25"><%#DataBinder.Eval(Container.DataItem, "p_views" ) %></td>
        </tr>
       
   </ItemTemplate>

   <FooterTemplate>
   
    </table>
    </FooterTemplate>
</asp:Repeater>
</div>